#ifndef _LINKSTACK_H_
#define _LINKSTACK_H_
#include "DoubleLinkList.h"

struct LinkStack;
typedef struct LinkStack LStack;

//初始化，指针指向的内存在堆上
LStack * InitLStack();
//入栈,即尾插
void SPush(LStack *s, ElementType element);
//出栈，即尾删
void SPop(LStack *s);
//获取栈顶元素
ElementType * GetSTop(LStack *s);
//栈是否为空
bool IsStackEmpty(LStack *s);
//清理栈
void ClearLStack(LStack *s,void (*clearPtr)(ElementType));
int GetStackLen(LStack *s);
void TravelLStack(LStack *s, void (*funcPtr)(ElementType));
#endif